﻿#pragma once

//【头文件包含】
#include<stdio.h>
#include<stdlib.h>
#include<assert.h>
#include<stdbool.h>
#include<math.h>

//【自定义配置】
typedef  char  BTDataType;



//【结构体声明】
/*定义一种链式树结构*/typedef struct BinaryTreeNode
{
	BTDataType data;
	struct BinaryTreeNode* left;
	struct BinaryTreeNode* right;
}BTNode;





//【函数声明】
/*初始化*/
/*前序遍历*/void PrevOrder(BTNode* root);
/*中序遍历*/void MidOrder(BTNode* root);
/*后序遍历*/void NextOrder(BTNode* root);
/*二叉树计算大小*/int TreeSize(BTNode* root);
/*二叉树计算叶子节点数量*/int TreeLeafSize(BTNode* root);
/*二叉树计算深度*/int TreeDepth(BTNode* root);
/*根据前序生成原树*/BTNode* gettreebyprevprint(char* prev, int* i);
/*二叉树查找值为x的节点*/BTNode* TreeFind(BTNode* root, BTDataType x);
/*二叉树销毁*/void DestoryTree(BTNode* root);
/*二叉树层序遍历*/void TreeLevelOrder(BTNode* root);
/*二叉树判断是否完全*/int TreeComplete(BTNode* root);
/**/
/**/
/**/